package com.cn.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by chenyuncong on 2018/9/13.
 */
@Controller
public class IndexController {
    @Value("${local.path}")
    private String localPath;

    @RequestMapping("")
    public String index(Model model){
        model.addAttribute("localPath",localPath);
        return "index";
    }

    @RequestMapping("index")
    public String index_html(Model model){
        model.addAttribute("localPath",localPath);
        return "index";
    }

    @RequestMapping("genProperty")
    public String genProperty(Long id, Model model){
        model.addAttribute("qId",id);
        return "gen_property";
    }
}
